<%--
  Created by IntelliJ IDEA.
  User: dzw
  Date: 2018/3/28
  Time: 10:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<div id="page-content">
  <div class="row">
    <div class="col-lg-12">
      <div class="panel">
        <div class="panel-heading">
          <h3 class="panel-title">数据导入导出</h3>
        </div>

        <div class="panel-body" style="display: none">
          <form class="form-horizontal" action="<%=path%>/com/dataUpdate/export" id="export_form" method="post">

          </form>
        </div>

      </div>
    </div>
  </div>
</div>

<script>

  $(".import").click(function(){
    $(this).attr("disabled", true);
    var name = $(this).attr("id");
    __ajax_post("<%=path%>/com/data/"+name,{},function(data){
      if(data.state==1){
        __toastr_success(data.message);
      }else{
        __toastr_error(data.message);
      }
      console.log(data);
    })
  });



</script>